package cn.chinawyny.boot.bootdemo.access;

import cn.hutool.json.JSONObject;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class AppVersionWholeAccess {

    public boolean checkAccess(HttpServletRequest request, String platform, String version) {
        System.out.println("platform："+platform);
        System.out.println("version："+version);
        return true;
    }

    public String getResJsonString() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.set("code","10022");
        jsonObject.set("message","正在维护中，请耐心等待稍后重试");
        return jsonObject.toString();
    }
}
